package day_2022_4_to_7.day48;

import java.util.Scanner;

/**
 * 字符串反转
 * @author haomin
 * @date 2022/05/17 16:37
 **/
public class Day20_1_ReverseString {
    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        String str = in.next();
        if(str == null || str.length() == 0){
            return;
        }
        // fun1(str);
        fun2(str);
    }
    private static void fun1(String str){
        String result = "";
        for(int i = str.length()-1;i >= 0 ; i--){
            result += str.charAt(i);
        }
        System.out.println(result);
    }
    private static void fun2(String str){
        char[] data = str.toCharArray();
        int i = 0;
        int j = data.length-1;
        while(i < j){
            char temp = data[i];
            data[i] = data[j];
            data[j] = temp;
            i++;
            j--;
        }
        System.out.println(new String(data));
    }
}